using System.Collections.Generic;
using System.Threading.Tasks;
using ThridGroup.ERP.DTO;
using Volo.Abp.Application.Services;

namespace ThridGroup.ERP.ProductionSystem
{
    /// <summary>
    /// 车间管理服务接口
    /// </summary>
    public interface IWorkshopService : IApplicationService
    {
        /// <summary>
        /// 添加车间
        /// </summary>
        Task<int> AddWorkshop(CreateUpdateWorkshopDto input);

        /// <summary>
        /// 获取所有车间
        /// </summary>
        Task<List<WorkshopDto>> GetWorkshops();

        /// <summary>
        /// 获取符合条件的车间列表
        /// </summary>
        Task<List<WorkshopDto>> GetWorkshopsByCondition(string code, string name, bool? isEnable);

        /// <summary>
        /// 获取单个车间
        /// </summary>
        Task<WorkshopDto> GetWorkshop(int id);

        /// <summary>
        /// 更新车间
        /// </summary>
        Task<int> UpdateWorkshop(int id, CreateUpdateWorkshopDto input);

        /// <summary>
        /// 删除车间
        /// </summary>
        Task DeleteWorkshop(int id);

        /// <summary>
        /// 检查车间编码是否存在
        /// </summary>
        Task<bool> IsCodeExist(string code, int? excludeId = null);

        /// <summary>
        /// 启用或禁用车间
        /// </summary>
        Task<bool> SetWorkshopStatus(int id, bool isEnable);

        /// <summary>
        /// 获取车间树形结构
        /// </summary>
        Task<List<WorkshopDto>> GetWorkshopTree();
    }
} 